<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean"%>
<%@ taglib uri="/WEB-INF/struts-html" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-logic" prefix="logic"%>

<html:form action="/sistema/usuario/criar" method="post" focus="nome">
	<table class="tbForm">
		<logic:messagesPresent message="false">
		<tr>
			<td colspan="2" class="erro">
				<bean:message key="formulario.informar.erros"/>
			</td>
		</tr>
		<tr>
			<td colspan="2" class="erro">
				<html:messages id="mensagem" message="false" property="falha">
					<bean:write name="mensagem"/>
				</html:messages>
			</td>
		</tr>
		</logic:messagesPresent>
		<tr>
			<td width="35%" valign="top" align="right"><bean:message key="formulario.usuario.nome"/>:</td>
			<td width="" align="left">
				<html:text property="nome" size="50" maxlength="50"/>
				<html:img pageKey="sistema.ico.dica" onclick="abrirJanelaDica('usuario/nome.htm')"/>
				<logic:messagesPresent message="false">
					<html:messages id="mensagem" message="false" property="nome">
						<br><span class="erro"><bean:write name="mensagem"/></span>
					</html:messages>
				</logic:messagesPresent>
			</td>
		</tr>
		<tr>
			<td align="right" valign="top" ><bean:message key="formulario.usuario.login"/>:</td>
			<td align="left">
				<html:text property="usuarioLogin" size="25" maxlength="20"/>
				<html:img pageKey="sistema.ico.dica" onclick="abrirJanelaDica('usuario/login.htm')"/>
				<logic:messagesPresent message="false">
					<html:messages id="mensagem" message="false" property="usuarioLogin">
						<br><span class="erro"><bean:write name="mensagem"/></span>
					</html:messages>
				</logic:messagesPresent>
			</td>
		</tr>

		<tr>
			<td align="right" valign="top" ><bean:message key="formulario.usuario.senha"/>:</td>
			<td align="left">
				<html:password property="senha" size="25" maxlength="50"/>
				<html:img pageKey="sistema.ico.dica" onclick="abrirJanelaDica('usuario/senha.htm')"/>
				<logic:messagesPresent message="false">
					<html:messages id="mensagem" message="false" property="senha">
						<br><span class="erro"><bean:write name="mensagem"/></span>
					</html:messages>
				</logic:messagesPresent>
			</td>
		</tr>

		<tr>
			<td align="right" valign="top" ><bean:message key="formulario.usuario.senha.confirmar"/>:</td>
			<td align="left">
				<html:password property="senhaConfirmacao" size="25" maxlength="50"/>
				<html:img pageKey="sistema.ico.dica" onclick="abrirJanelaDica('usuario/senha(confirmar).htm')"/>
				<logic:messagesPresent message="false">
					<html:messages id="mensagem" message="false" property="senhaConfirmacao">
						<br><span class="erro"><bean:write name="mensagem"/></span>
					</html:messages>
				</logic:messagesPresent>
			</td>
		</tr>
		<tr>
			<td align="right" valign="top" >
				<bean:message key="formulario.usuario.papeis"/>:
				<html:img pageKey="sistema.ico.dica" onclick="abrirJanelaDica('usuario/papeis.htm')"/>
			</td>
			<td align="left">
				<logic:messagesPresent message="false">
					<html:messages id="mensagem" message="false" property="papeis">
						<span class="erro"><bean:write name="mensagem"/></span><br>
					</html:messages>
				</logic:messagesPresent>
				
				<logic:iterate id="papel" name="papeis">
					<html:multibox property="papeis">
						<bean:write name="papel"/>
					</html:multibox>
					<bean:message key="formulario.usuario.info.papel"/> <bean:write name="papel"/> <br>
				</logic:iterate>
			</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td align="left">
				<html:submit><bean:message key="sistema.botao.salvar"/></html:submit>
			</td>
		</tr>
	</table>
</html:form>